package com.yunnuo.system.config.dao;

import com.yunnuo.system.config.entity.Config;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * Created by w_weihf on 2018/8/3.
 */
@Repository
@Transactional
public interface IConfigDao extends JpaRepository<Config,String>,JpaSpecificationExecutor<Config> {

    /**
     * 根据key查询系统配置
     * @param key
     * @return
     */
    Config findAllByConfigKey(String key);

    int countAllByIdAndConfigKey(String id,String configKey);

    int countAllByConfigKey(String configKey);
}
